/* AI命令面板样式 */

.command-palette-modal .ant-modal-body {
  max-height: 600px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 搜索框区域 */
.command-search {
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.command-search .ant-input-affix-wrapper {
  background: #f5f7fa;
  border-radius: 8px;
  padding: 8px 12px;
}

.command-search input {
  background: transparent;
  font-size: 16px;
}

/* 命令列表 */
.command-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.command-executing {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

/* 命令项 */
.command-item {
  padding: 12px 16px !important;
  cursor: pointer;
  transition: background 0.2s;
  border-left: 3px solid transparent;
}

.command-item:hover {
  background: #f5f7fa;
}

.command-item.selected {
  background: #f5f7fa;
  border-left-color: #667eea;
}

.command-item .ant-list-item-meta-title {
  font-size: 14px;
  font-weight: 500;
}

.command-item .ant-list-item-meta-description {
  font-size: 12px;
  color: #8c8c8c;
}

/* 快捷键提示 */
.command-shortcut {
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 11px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  color: #666;
  background: #f0f0f0;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
}

/* 底部提示 */
.command-footer {
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  text-align: center;
}

.command-footer kbd {
  display: inline-block;
  padding: 3px 6px;
  font-size: 11px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  color: #333;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 滚动条样式 */
.command-list::-webkit-scrollbar {
  width: 6px;
}

.command-list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.command-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.command-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 动画效果 */
.command-palette-modal {
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .command-palette-modal .ant-modal-content {
    background: #1f1f1f;
  }

  .command-search {
    border-bottom-color: #434343;
  }

  .command-search .ant-input-affix-wrapper {
    background: #2a2a2a;
  }

  .command-item:hover,
  .command-item.selected {
    background: #2a2a2a;
  }

  .command-item.selected {
    border-left-color: #177ddc;
  }

  .command-footer {
    background: #2a2a2a;
    border-top-color: #434343;
  }

  .command-footer kbd {
    background: #3a3a3a;
    border-color: #434343;
    color: #e8e8e8;
  }

  .command-shortcut {
    background: #3a3a3a;
    border-color: #434343;
    color: #b8b8b8;
  }
}

/* 移动端适配 */
@media (max-width: 768px) {
  .command-palette-modal {
    max-width: 100%;
    margin: 0;
  }

  .command-palette-modal .ant-modal-body {
    max-height: calc(100vh - 100px);
  }

  .command-item {
    padding: 10px 12px !important;
  }

  .command-search input {
    font-size: 14px;
  }
}